package com.weaponlin.optional;

import java.util.Optional;

public class OptionalTest {

    public static void main(String[] args) {
        String res1 = Optional.ofNullable(null).map(Object::toString).orElse("null");
        String res2 = Optional.ofNullable(100).map(Object::toString).orElse("null");
        System.out.println(res1);
        System.out.println(res2);
    }
}
